
#include "cocos2d.h"
#include "Director/DirectorLoader.h"

#include "config.h"
#include "src/TestMacros.h"
#include "src/CheckMacros.h"
#include "src/TestRunner.h"
#include "src/TimeConstraint.h"
#include "src/ReportAssert.h"

using namespace cocos2d;
using namespace UnitTest;

SUITE(DirectorLoader)
{

	TEST(PositiveLog)
	{
		CHECK_EQUAL(DirectorLoader::getPosLogVarK(0,0,0,0), 0);

		CHECK_EQUAL(DirectorLoader::getPosLogXValue(0,0,0), 0);
		CHECK_EQUAL(DirectorLoader::getPosLogXValue(3,1,4), 0);

		CHECK_EQUAL(DirectorLoader::getNegLogVarK(0,0,0,0), 0);

		CHECK_EQUAL(DirectorLoader::getNegLogVarK(0,0,0,0), 0);
	}

	TEST(NegativeLog)
	{
		CHECK_EQUAL(DirectorLoader::getNegLogVarK(0,0,0,0), 0);

		CHECK_EQUAL(DirectorLoader::getNegLogVarC(0,0,-999), 0);

		CHECK_EQUAL(DirectorLoader::getNegLogValue(0,0,0), 0);
		CHECK_EQUAL(DirectorLoader::getNegLogValue(1,1,1), 0);
		CHECK_EQUAL(DirectorLoader::getNegLogValue(-1,-1,-1), 0);
	}

	TEST(PositiveLine)
	{
		CHECK_EQUAL(DirectorLoader::getPosLineVarK(0,0,0,0), 0);
		CHECK_EQUAL(DirectorLoader::getPosLineVarK(5,2,3,3), 0);
		CHECK_EQUAL(DirectorLoader::getPosLineVarK(5,2,-3,-3), 0);

		CHECK_EQUAL(DirectorLoader::getPosLineValue(0,0,0), 0);
		CHECK_EQUAL(DirectorLoader::getPosLineValue(0,2,3), 0);
	}

	TEST(NegativeLine)
	{
		CHECK_EQUAL(DirectorLoader::getNegLineVarK(0,0,0,0), 0);
		CHECK_EQUAL(DirectorLoader::getNegLineVarK(5,2,3,3), 0);
		CHECK_EQUAL(DirectorLoader::getNegLineVarK(5,2,-3,-3), 0);

		CHECK_EQUAL(DirectorLoader::getNegLineValue(0,0,0), 0);
		CHECK_EQUAL(DirectorLoader::getNegLineValue(0,2,3), 0);
	}


}
